package StudentsManage;

import java.util.Scanner;

public class Menu {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (true) {
            System.out.println("------欢迎使用学生管理系统------");
            System.out.println("1. 添加学生");
            System.out.println("2. 删除学生");
            System.out.println("3. 修改学生");
            System.out.println("4. 查看所有学生");
            System.out.println("5. 退出系统");
            System.out.print("请输入您的选择：");

            int choice = sc.nextInt();
            switch (choice) {
                case 1:
                    AddStu.addStu();
                    break;
                case 2:
                    DeleteStu.deleteStu();
                    break;
                case 3:
                    UpdateStu.updateStu();
                    break;
                case 4:
                    ViewStu.viewStu();
                    break;
                case 5:
                    System.out.println("欢迎下次使用！");
                    System.exit(0);
                default:
                    System.out.println("输入错误，请重新输入！");
                    break;
            }
        }
    }
}
